home *** CD-ROM | disk | FTP | other *** search
- Path: fire.wildfire.com!newsadm
- From: Stonewall Ballard <stoney@wildfire.com>
- Newsgroups: comp.lang.c++
- Subject: Is there a standard for * and & placement style?
- Date: Mon, 19 Feb 1996 13:10:57 -0500
- Organization: Wildfire Communications, Inc.
- Message-ID: <3128BD31.4AF8@wildfire.com>
- NNTP-Posting-Host: zaphod.wildfire.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
- CC: dev@wildfire.com
-
- I'm trying to find out whether there is a "standard" for the
- placement of * and &. A survey of C++ texts shows that most use
-
- Form 1
- int& foo;
- int* foo;
-
- while some use
-
- Form 2
- int& foo;
- int *foo;
-
- and nobody uses (although I've seen this a lot in code)
-
- Form 3
- int &foo;
- int *foo;
-
- The ARM and the latest C++ working paper both use form 1. The
- most well-known user of form 2 is Scott Meyers in his Effective
- C++ books. People I work with use form 3.
-
- Imagine that you were given a class framework to use and extend.
- Would you expect that the placement of & and * follow one of the
- above schemes? Do you perceive that there is a standard for the
- placement of * and &? If so, what is it?
-
- Please reply by email to stoney@wildfire.com
-
- I will summarize the results to the group.
-
- Thanks very much!
-
- - Stoney
-
-
- ----------------------------------------------------------------
- -------
- Stonewall Ballard "I have one grunch but the eggplant over
- there"
- stoney@wildfire.com (work) Wildfire
- Communications, Inc.
- stoney@beeblebrox.com (home)
- http://www.tiac.net/users/stoney/
-